import {RouterModule, Routes} from "@angular/router";
import {NgModule} from "@angular/core";
import {AuthComponent} from "./auth/auth.component";
import {ListComponent} from "./List/list.component";

const  adminModule = () =>
  import('./admin/admin.module').then(module => module.AdminModule);//懒加载

const routes: Routes = [
  {
    path: 'admin',
    loadChildren: adminModule
  },
  {
    path: 'auth',
    component: AuthComponent
  },
  {
    path: 'list',
    component: ListComponent
  }
];
@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule{

}
